﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Home.Master" Inherits="System.Web.Mvc.ViewPage<SDT.Site.ViewModels.ArticleDetailViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%=Model.Article != null ?Html.Encode(Model.Article.Title) : "Bài viết không tồn tại hoặc đã bị xóa bởi người khác"%>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%if (Model.Article != null)
  { %>
<div class="clear"></div>
<div class="breadcrumbs">
    <a href="/home">Trang chủ</a>
    <%if (Model.Article.ArticleCategory != null)
      { %>
        <%if (Model.Article.ArticleCategory.ParentArticleCategory != null)
          { %>
            <span></span><a href="/article/index/<%=Model.Article.ArticleCategory.ParentID %>"><%=Model.Article.ArticleCategory.ParentArticleCategory != null ? Html.Encode(Model.Article.ArticleCategory.ParentArticleCategory.Name) : string.Empty%></a>
        <%} %>
        <span></span><a href="/article/list/<%=Model.Article.ArticleCategory.ID %>"><%=Model.Article.ArticleCategory != null ? Html.Encode(Model.Article.ArticleCategory.Name) : string.Empty%></a>
        <span></span><%=Model.Article.Title.Length>60? Html.Encode(Model.Article.Title.Substring(0,60))+"...": Html.Encode(Model.Article.Title) %> 
    <%} %>
</div>
<div class="line"></div>
<%} %>
<div id="detail-art">
    <h2><%=Html.Encode(Model.Article.Title)%></h2>
    <div class="content-detail-art-date">
        <%=Model.Article.AddDate != null ? (SDT.Lib.Common.Utils.ToDayOfWeekLabel(Model.Article.AddDate) + ", " + string.Format("{0:dd/MM/yyyy, hh:mm tt}", Model.Article.AddDate)) : string.Empty%>
        <%var company= Model.Article.ArticleCompanyMaps.FirstOrDefault();
          if (company != null) Response.Write("&nbsp;|&nbsp;" + Html.Encode(company.Company.ShortName));  
            %>
    </div>
    <div class="summary-detail-art">
        <%=Html.Encode(Model.Article.Summary) %>           
    </div>
    <div class="content-detail-art" id="content-art">
        <%=Model.Article.ArticleContent%>
        <% Html.RenderPartial("~/Views/Data/Attachs.ascx", Model.Article); %> 
    </div>
</div>
<div class="clear">&nbsp;</div>
<% Html.RenderAction("GetTags", "article", new { id = Model.Article.ID }); %>
<div class="clear">&nbsp;</div>
<%if (Model.Article != null)
  { %>
<% Html.RenderAction("LatestComments","Article", new { id = Model.Article.ID, number=20 }); %>
<% Html.RenderAction("Comment","Article", new { id = Model.Article.ID }); %>
<%} %>
<div class="clear"></div>
 <% Html.RenderAction("GetOther", "Article", new { number = 8, skip = 0, id = Model.Article.ID, title = "Tin cùng doanh nghiệp", aorder = "ID", aorderDir = "desc", 
          viewName = "GetOther", controllerName = "company", actionList = "list", actionDetail = "details", projectid = 0, companyid = 1, eventid=0 }); %>
<div class="clear"></div>
 <% Html.RenderAction("GetOther", "Article", new { number = 8, skip = 0, id = Model.Article.ID, title = "Tin mới khác", aorder = "ID", aorderDir = "desc", 
          viewName = "GetOther", controllerName = "company", actionList = "list", actionDetail = "details", projectid = 0, companyid = 0, eventid=0 }); %>


</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="RightContent" runat="server">
    <% Html.RenderAction("Lasted", "Video", new { catid = SDT.Model.ConfigManager.GetVideoDoanhnghiep(), number = 3, title = string.Empty }); %>
   <div class="clear"></div>
   <div class="box_qcao">
    <a href="/company/create"><img src="/images/ftc/dangtindoanhnghiep.jpg" /></a>
   </div>
   <% Html.RenderAction("Focus", "company", new { number = 5, skip = 0, catid = Model.Article.ArticleCategory != null ? Model.Article.ArticleCategory.ID : SDT.Model.ConfigManager.GetTindoanhnghiep(), title = "Bài xem nhiều", order = "nViews", orderDir = "desc" }); %>
   <div class="clear"></div>
   <% Html.RenderAction("GetRight", "Article", new { number = 5, skip = 0, catid = SDT.Model.ConfigManager.GetReaders(), title = "Góc bạn đọc", aorder = "ID", aorderDir = "desc", viewName = "GetRightByCat", controllerName = "readers", actionList = "index", actionDetail = "details" }); %>
   <div class="clear"></div>
   <div class="box_qcao">
    <a href="/readers/create"><img src="/images/ftc/guibaiviet_big.png" /></a>
   </div>
   <div class="clear"></div>
   <% Html.RenderAction("GetRight", "Article", new { number = 5, skip = 0, catid = SDT.Model.ConfigManager.GetNhacuasao(), title = "Nhà của sao", aorder = "ID", aorderDir = "desc", viewName = "GetRightByCat", controllerName = "news", actionList = "list", actionDetail = "details" }); %>
   <div class="clear"></div>
   <div class="clear"></div>
   <% Html.RenderAction("GetRight", "Article", new { number = 5, skip = 0, catid = SDT.Model.ConfigManager.GetChuyengiaPhantich(), title = "Chuyên gia phân tích", aorder = "ID", aorderDir = "desc", viewName = "GetRightByCat", controllerName = "article", actionList = "list", actionDetail = "details" }); %>
   <div class="clear"></div>

   <% Html.RenderAction("GetRight", "Article", new { number = 5, skip = 0, catid = SDT.Model.ConfigManager.GetCamnangMuaban(), title = "Cẩm nang mua bán", aorder = "ID", aorderDir = "desc", viewName = "GetRightByCat", controllerName = "news", actionList = "list", actionDetail = "details" }); %>
   <div class="clear"></div>
   <% Html.RenderAction("GetRight", "Article", new { number = 5, skip = 0, catid = SDT.Model.ConfigManager.GetCamnangNhadautu(), title = "Cẩm nang nhà đầu tư", aorder = "ID", aorderDir = "desc", controllerName = "news", viewName = "GetRightByCat", actionList = "list", actionDetail = "details" }); %>
   <div class="clear"></div>
   <% Html.RenderAction("GetRight", "Article", new { number = 5, skip = 0, catid = SDT.Model.ConfigManager.GetCamnangMoigioi(), title = "Cẩm nang nhà môi giới", aorder = "ID", aorderDir = "desc", controllerName = "news", viewName = "GetRightByCat", actionList = "list", actionDetail = "details" }); %>
</asp:Content>
